<template>
  <view class="pannel-box">
    <NavBar v-if="navbar" @back="onBack" :title="title"></NavBar>
    <slot></slot>
  </view>
</template>

<script>
import NavBar from '../NavBar/NavBar.vue';

export default {
  name: 'Pannel',
  components: {
    NavBar
  },
  props: {
    title: {
      type: String,
      default: ''
    },
    navbar: { type: Boolean, default: false }
  },
  emits: ['back'],
  methods: {
    onBack() {

    }
  }
}
</script>

<style lang="scss" scoped>
.pannel-box {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #F9F9F9;
}
</style>